<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/equ_equipmentrepair/EQU_EquipmentRepair.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/equ_equipmentrepair/EQU_EquipmentRepair.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'EquipmentRepair_Id',
                footer: "Foots",
                cnName: '维修',
                name: 'equ_equipmentrepair/EQU_EquipmentRepair',
                url: "/EQU_EquipmentRepair/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"EquipmentID":"","RepairDate":"","RepairReason":"","RepairContent":"","RepairPerson":"","RepairCost":"","RepairStatus":"","RepairStartTime":"","RepairEndTime":""});
            const editFormOptions = ref([[{"dataKey":"设备列表","data":[],"title":"设备名称","field":"EquipmentID","type":"select"},
                               {"title":"维修日期","field":"RepairDate","type":"datetime"},
                               {"title":"维修原因","field":"RepairReason"}],
                              [{"title":"维修内容","field":"RepairContent"},
                               {"title":"维修人员","field":"RepairPerson"},
                               {"title":"维修成本","field":"RepairCost","type":"number"}],
                              [{"title":"维修状态","field":"RepairStatus"},
                               {"title":"维修开始时间","field":"RepairStartTime","type":"datetime"},
                               {"title":"维修结束时间","field":"RepairEndTime","type":"datetime"}]]);
            const searchFormFields = ref({"EquipmentID":""});
            const searchFormOptions = ref([[{"dataKey":"设备列表","data":[],"title":"设备名称","field":"EquipmentID","type":"select"}]]);
            const columns = ref([{field:'EquipmentRepair_Id',title:'EquipmentRepair_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'EquipmentID',title:'设备名称',type:'guid',bind:{ key:'设备列表',data:[]},width:110,align:'left',sort:true},
                       {field:'RepairDate',title:'维修日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'RepairReason',title:'维修原因',type:'string',link:true,width:120,align:'left'},
                       {field:'RepairContent',title:'维修内容',type:'string',width:120,align:'left'},
                       {field:'RepairPerson',title:'维修人员',type:'string',width:120,align:'left'},
                       {field:'RepairCost',title:'维修成本',type:'decimal',width:110,align:'left'},
                       {field:'RepairStatus',title:'维修状态',type:'string',width:120,align:'left'},
                       {field:'RepairStartTime',title:'维修开始时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'RepairEndTime',title:'维修结束时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
